package com.example.aichat.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.example.aichat.entity.Conversation;
import com.example.aichat.entity.Message;

import java.util.List;

/**
 * 聊天服务接口
 */
public interface ChatService extends IService<Conversation> {
    /**
     * 创建新对话
     */
    Conversation createConversation(Long userId, String title);

    /**
     * 发送消息
     */
    Message sendMessage(Long conversationId, String content, String sender);

    /**
     * 获取对话列表
     */
    List<Conversation> getConversations(Long userId);

    /**
     * 获取对话消息
     */
    List<Message> getMessages(Long conversationId);

    /**
     * 删除对话
     */
    boolean deleteConversation(Long conversationId);
}    